import difflib
fileName = 'eog'
file_1=open(fileName+'0.py','r',encoding='utf-8').readlines()
file_2=open(fileName+'1.py','r',encoding='utf-8').readlines()
d=difflib.HtmlDiff()
results=d.make_file(file_1,file_2) # 返回HTML形式的比较字符串
with open(fileName+'_results.html','w') as file:
	file.write(results)	# 将比较结果保存在results.html文件中
